﻿<%@ Page Title="" Language="C#" MasterPageFile="~/BookStore.Master" AutoEventWireup="true" CodeBehind="CatTitulos.aspx.cs" Inherits="Bukstor.UI.CatTitulos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:GridView ID="gvTitulos" runat="server" 
        onselectedindexchanged="GridView1_SelectedIndexChanged" 
        AutoGenerateColumns="False" DataSourceID="odsTitulos" DataKeyNames="Id">
        <Columns>
            <asp:CommandField ButtonType="Image" 
                SelectImageUrl="~/images/icoLupa.gif" 
                ShowSelectButton="True" />
            <asp:BoundField DataField="Autores" HeaderText="Autor(es)" 
                SortExpression="Autores" />
            <asp:BoundField DataField="Titulo" HeaderText="Titulo" 
                SortExpression="Titulo" />
            <asp:BoundField DataField="Precio" DataFormatString="{0:c}" HeaderText="Precio" 
                SortExpression="Precio" />
            <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" 
                Visible="False" />
        </Columns>
    </asp:GridView>
    <asp:ObjectDataSource ID="odsTitulos" runat="server" 
        SelectMethod="TraerTitulos" TypeName="Bukstor.UI.CatTitulos">
        <SelectParameters>
            <asp:QueryStringParameter Name="subcategoria" QueryStringField="subcat" 
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <!-- Utilizar el GridView. La tabla es de ejemplo -->
    </asp:Content>
